package com.eden.manage.utils;

import java.util.Random;

public class InviteCodeGenerator {


    // 生成带有字母的邀请码
    public static String generateInviteCode() {
        int length = 8;
        StringBuilder inviteCode = new StringBuilder();
        Random random = new Random();
        String chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
        for (int i = 0; i < length; i++) {
            char randomChar = chars.charAt(random.nextInt(chars.length()));
            inviteCode.append(randomChar);
        }
        return inviteCode.toString();
    }

}
